package cat.sun.themes;

import android.content.Context;
import android.graphics.BitmapFactory;

public class GetThemePackage 
{
	public static ThemePackage getThemePackage(String themeType,Context context)
	{
		ThemePackage themePackage = new ThemePackage();
		int idOne = context.getResources().getIdentifier(themeType+"_"+"one", "drawable", context.getPackageName());	
		int idTwo = context.getResources().getIdentifier(themeType+"_"+"two", "drawable", context.getPackageName());	
		int idThree = context.getResources().getIdentifier(themeType+"_"+"three", "drawable", context.getPackageName());	
		int idFour = context.getResources().getIdentifier(themeType+"_"+"four", "drawable", context.getPackageName());	
		int idFive = context.getResources().getIdentifier(themeType+"_"+"five", "drawable", context.getPackageName());	
		int idSix = context.getResources().getIdentifier(themeType+"_"+"six", "drawable", context.getPackageName());	
		int idSeven = context.getResources().getIdentifier(themeType+"_"+"seven", "drawable", context.getPackageName());	
		int idEight = context.getResources().getIdentifier(themeType+"_"+"eight", "drawable", context.getPackageName());
		
		int idBomb = context.getResources().getIdentifier(themeType+"_"+"bomb", "drawable", context.getPackageName());
		int idRedBomb = context.getResources().getIdentifier(themeType+"_"+"red_bomb", "drawable", context.getPackageName());
		int idFlag = context.getResources().getIdentifier(themeType+"_"+"flag", "drawable", context.getPackageName());
		int idCrossFlag = context.getResources().getIdentifier(themeType+"_"+"crossed_flag", "drawable", context.getPackageName());
		int idOpen = context.getResources().getIdentifier(themeType+"_"+"open", "drawable", context.getPackageName());
		int idClose = context.getResources().getIdentifier(themeType+"_"+"close", "drawable", context.getPackageName());
		
		themePackage.setOne(BitmapFactory.decodeResource(context.getResources(),idOne));
		themePackage.setTwo(BitmapFactory.decodeResource(context.getResources(),idTwo));
		themePackage.setThree(BitmapFactory.decodeResource(context.getResources(),idThree));
		themePackage.setFour(BitmapFactory.decodeResource(context.getResources(),idFour));
		themePackage.setFive(BitmapFactory.decodeResource(context.getResources(),idFive));
		themePackage.setSix(BitmapFactory.decodeResource(context.getResources(),idSix));
		themePackage.setSeven(BitmapFactory.decodeResource(context.getResources(),idSeven));
		themePackage.setEight(BitmapFactory.decodeResource(context.getResources(),idEight));
		
		themePackage.setBomb(BitmapFactory.decodeResource(context.getResources(),idBomb));
		themePackage.setRedBomb(BitmapFactory.decodeResource(context.getResources(),idRedBomb));
		themePackage.setFlag(BitmapFactory.decodeResource(context.getResources(),idFlag));
		themePackage.setCrossFlag(BitmapFactory.decodeResource(context.getResources(),idCrossFlag));
		themePackage.setOpenCell(BitmapFactory.decodeResource(context.getResources(),idOpen));
		themePackage.setCloseCell(BitmapFactory.decodeResource(context.getResources(),idClose));
	
		
		return themePackage;  
	}
}
